package com.mspbots.teams.controller;


import com.mspbots.teams.model.UtilizationDTO;
import com.mspbots.teams.service.UtilizationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Callable;

@Slf4j
@RestController
@RequestMapping("utilization")
public class UtilizationController {

    @Autowired
    private UtilizationService utilizationService;

    @PostMapping("check")
    public Callable check(@RequestBody UtilizationDTO utilizationDTO) {
        return () -> utilizationService.check(utilizationDTO);
    }


}
